package point;


public class CastingToSubtype {

	public static void main(String[] args) {
		Point p = new Point(2, 5);
		Object[] list = new Object[1];

		list[0] = p;
		// Point q = list.get(0); // compile error
		@SuppressWarnings("unused")
		Point q = (Point) list[0];
		@SuppressWarnings("unused")
		Cloneable c = (Cloneable) list[0];
		@SuppressWarnings("unused")
		String s = (String) list[0]; // exception
	}

}
